
<template>
  <div class="contentBox" @click.stop="goto(bannerList[0].jump_url)">
    <img :src=" bannerList&&bannerList.length&&bannerList[0].image" alt="" >
  </div>
</template>
  
<script lang="ts" setup>
import { ref, reactive, defineProps } from "vue";
import { useRouter } from "vue-router";
const props = defineProps({
  bannerList: {
    type: Array as () => Array<any>, //(string也可以是其他你自定义的接口)
    required: true,
    default: () => []
  }
});
const router = useRouter()
const goto = (url: string) => {
  console.log(123);
  
  router.push(url)
}
</script>
  
  
<style scoped lang="less">
.contentBox {
  max-width: 1920px;
  height: 699px;
  margin: 0 auto;
  background: #f5f5f5;

  img {
    width: 100%;
    height: 100%;
  }
}
</style>
  